package com.example.spring_boot_demo.service.impl;

import com.example.spring_boot_demo.dto.Goods;
import com.example.spring_boot_demo.dto.GoodsRequest;
import com.example.spring_boot_demo.mapper.GoodsMapper;
import com.example.spring_boot_demo.service.GoodsService;
import com.example.spring_boot_demo.utils.AjaxResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <P> @Author: SongKeCheng
 * <P> Type: Class
 * <P> Description:
 * <P> Date: 2024/12/18:18:02
 */

@SuppressWarnings({"unchecked", ""})
@Service
public class GoodsServiceImpl implements GoodsService {
    private static final Logger log = LoggerFactory.getLogger(GoodsServiceImpl.class);


    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public AjaxResult findGoods(GoodsRequest goodsRequest) {
       List<Goods> goods =  goodsMapper.findGoods(goodsRequest);
        return AjaxResult.success(goods);
    }
}
